# $Id: PKGBUILD 71880 2012-06-02 18:41:08Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=tilda
pkgver=0.9.6
pkgrel=6
pkgdesc="Linux terminal based on classic terminals from first person shooter games"
arch=('i686' 'x86_64')
url="http://tilda.sourceforge.net"
license=('GPL')
depends=('vte' 'confuse' 'libglade')
makedepends=('gawk')
source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
        tilda-fix.patch tilda-glib2.patch tilda-conf-sigsegv.patch)
sha256sums=('b3bd0f63eb83a5001ef26056ca116e5f8005d454f8f82a94f334868862068411'
            'ceac38bb33a0e8141f7b6cbc55807c999729319f2fdfaa3c375aa1a541d29729'
            'c71cdd8cdc1fdd76c919605c6b7a1b89e4929d20630db17145e6c2b584c8aaf9'
            'e28c731c0ca94210d5e4f4b7dd0eee9952405593f1d06e4ab2d87ee299e3e533')

build() {
  cd $srcdir/$pkgname-$pkgver

# gdk && desktop file fix FS#25762
  patch -p0 -i ${srcdir}/$pkgname-fix.patch

# glib2 fix
  patch -p0 -i ${srcdir}/$pkgname-glib2.patch

# fix segfaults on malformed config files FS#29754
  patch -p0 -i ${srcdir}/$pkgname-conf-sigsegv.patch

  ./configure --prefix=/usr
  make
}

package() {
  cd $srcdir/$pkgname-$pkgver

  make DESTDIR=${pkgdir} install
}
